/**
 * 
 */
package org.jenkon.commons.collection.decorator;

import java.util.ListIterator;

/**
 * @author Jens Konopka
 * 
 * @param <E>
 */
public abstract class ListIteratorDecorator<E> implements ListIterator<E> {

	protected final ListIterator<E> iterator;

	/**
	 * @param iterator {@link ListIterator}
	 */
	public ListIteratorDecorator(final ListIterator<E> iterator) {
		this.iterator = iterator;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#hasNext()
	 */
	public boolean hasNext() {
		return iterator.hasNext();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#next()
	 */
	public E next() {
		return iterator.next();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#hasPrevious()
	 */
	public boolean hasPrevious() {
		return iterator.hasPrevious();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#previous()
	 */
	public E previous() {
		return iterator.previous();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#nextIndex()
	 */
	public int nextIndex() {
		return iterator.nextIndex();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#previousIndex()
	 */
	public int previousIndex() {
		return iterator.previousIndex();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#remove()
	 */
	public void remove() {
		iterator.remove();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#set(java.lang.Object)
	 */
	public void set(final E e) {
		iterator.set(e);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.ListIterator#add(java.lang.Object)
	 */
	public void add(final E e) {
		iterator.add(e);
	}

}
